# -*- encoding: utf-8 -*-

from datascrapy.util import REDIS_SERVER


def get_value(key):
    value = REDIS_SERVER.get(key)
    if value is None:
        return None
    else:
        return bytes.decode(value)


def set_value(key, value):
    REDIS_SERVER.set(key, value)
